// Admin.h : Declaration of the CAdmin

#ifndef __ADMIN_H_
#define __ADMIN_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CAdmin
class ATL_NO_VTABLE CAdmin : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CAdmin, &CLSID_Admin>,
	public ISupportErrorInfo,
	public IConnectionPointContainerImpl<CAdmin>,
	public IDispatchImpl<IAdmin, &IID_IAdmin, &LIBID_ACTIVCARDLib>
{
public:
	CAdmin()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_ADMIN)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CAdmin)
	COM_INTERFACE_ENTRY(IAdmin)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
	COM_INTERFACE_ENTRY(IConnectionPointContainer)
END_COM_MAP()
BEGIN_CONNECTION_POINT_MAP(CAdmin)
END_CONNECTION_POINT_MAP()


// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

// IAdmin
public:
	STDMETHOD(AssignTokenToUser)(/*[in]*/BSTR bstrSn,/*[in]*/BSTR bstrUsername);
	STDMETHOD(GetUsers)(/*[in]*/unsigned long ulFirstUserNo,/*[in]*/unsigned long ulGetUsersCount,/*[out,retval]*/BSTR * pbstrUsers);
	STDMETHOD(GetUserCount)(/*[out,retval]*/unsigned long * pulUsersCount);
	STDMETHOD(GetTokens)(/*[in]*/unsigned long ulFirstTokenNo,/*[in]*/unsigned long ulGetTokensCount,/*[out,retval]*/BSTR * pbstrTokens);
	STDMETHOD(GetTokensCount)(/*[out,retval]*/unsigned long * pulTokensCount);
	STDMETHOD(GetLogs)(/*[in]*/unsigned long ulFirstLogNo,/*[in]*/unsigned long ulGetLogsCount,/*[out,retval]*/BSTR * pbstrLogs);
	STDMETHOD(GetLogsCount)(/*[out,retval]*/unsigned long * pulLogsCount);
};

#endif //__ADMIN_H_
